@extends('home.layout.base')

<link rel="stylesheet" href="{{URL::asset('./css/store/service.css')}}">
@section('content')
@include('home.store.storeHeader')

<div class="main" id="storeService"  v-cloak>
    <div class="companyServe_details">
        <div v-for="(item,index) in storeService">
            <div class="companyServe_details_title">
                <img :src="item.thumb" alt="">
                <span>@{{item.title}}</span>
            </div>
            <div class="companyServe_details_main">
                <span>
                    @{{item.summary}}

                </span>
                <div @click="getServiceDetails(item.id)">查看详情 ></div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('scripts')
<script>
    $(() => {
        let storeSummary = new Vue({
            el: '#storeService',
            data: () => {
                return {
                    storeId: getQueryString('id'),
                    storeService: [],

                }
            },
            created() {
                let storeDetailData = {
                    id: this.storeId

                }
                apiAjax("{{ route('home.store.serviceApi')}}", 'get', storeDetailData, (res) => {
                    if (res.code == 0) {
                        this.storeService = res.data;
                    } else {}
                }, (erro) => {});
            },
            mounted() {},
            methods: {
                getServiceDetails(id) {
                    window.location.href = "{{ route('home.store.serviceDetails') }}?id=" + this.storeId + "&serviceId=" + id
                }

            }
        })
    })
</script>
@endsection